package onion.molingo2o.activity.request;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.PersistableBundle;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.AbsoluteSizeSpan;
import android.text.style.ForegroundColorSpan;
import android.view.View;
import android.widget.TextView;

import com.easemob.chatuidemo.ui.BaseActivity;

import onion.molingo2o.R;
import onion.molingo2o.utils.UIUtils;

/**
 * Created by Administrator on 2015/12/27.
 */
public class SendResultActivity extends BaseActivity {
    Handler handler;
    TextView tv_result;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sendresult);
        initTitle(null, "发布需求", "");
        String count = 24 + "";
        SpannableString sp = new SpannableString("系统已将你的需求发送给" + count + "位服务者");
        sp.setSpan(new ForegroundColorSpan(0xFFFF7419), 11, 11 + count.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
//        sp.setSpan(new AbsoluteSizeSpan(UIUtils.dp2px(11),true),11,11+count.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
        tv_result = (TextView) findViewById(R.id.tv_result);
        tv_result.setText(sp);
        /*handler = new Handler() {
            @Override
            public void handleMessage(Message msg) {
                super.handleMessage(msg);
                tv_content.setText(msg.arg1 + "s后返回上级");
                if (msg.arg1 > 0) {
                    Message message = Message.obtain();
                    message.what = recoder;
                    message.arg1 = msg.arg1 - 1;
                    handler.sendMessageDelayed(message, 1000);
                } else {
                    if (!payResult) StatService.onEvent(PaySufActivity.this, "id_task", "payfail");
                    startActivity(intentTarget);
                    finish();
                }
            }
        };*/
        findViewById(R.id.btn_submit).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

    }
}
